package org.xxx.epms.feedback.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.xxx.epms.feedback.dto.AqiMeasuredResultDto;
import org.xxx.epms.feedback.dto.GridCityDto;
import org.xxx.epms.feedback.feign.handler.AqiMeasuredResultFeignHandler;


@FeignClient(value = "epms-result",fallback = AqiMeasuredResultFeignHandler.class)
@Component
public interface AqiMeasuredResultFeign {

    @PostMapping("result/createAqiMeasuredResult")
    Integer createAqiMeasuredResult(@RequestBody AqiMeasuredResultDto aqiMeasuredResultDto);

    @GetMapping("result/getMeasuredResultByFbId")
    AqiMeasuredResultDto getMeasuredResultByFbId(@RequestParam("fbId")Integer fbId);

    @GetMapping("result/gridCity/getGridCityByIdFeign")
    GridCityDto getGridCityById(@RequestParam("cityId") Integer cityId);

}
